package com.atguigu.order.orders.service;

import com.atguigu.order.vo.OrderConfirmVo;
import com.atguigu.order.vo.OrderSubmitVo;
import com.atguigu.order.vo.SubmitOrderResponseVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.order.orders.entity.OmsOrderEntity;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;

import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author qhw
 * @email qhw@gmail.com
 * @date 2021-08-03 19:49:59
 */
public interface OmsOrderService extends IService<OmsOrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo toTrade() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo submitVo);


    void listenOrder(OmsOrderEntity orderEntity, Channel channel, Message message) throws IOException;
}

